﻿<UserControl x:Class="IsikFx.Project.ClientApp.Pages.Home"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:mui="http://firstfloorsoftware.com/ModernUI"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="800"
             >
    <Grid Style="{StaticResource ContentRoot}">
        <StackPanel Name="stackProfile" HorizontalAlignment="Left" VerticalAlignment="Top" Height="50">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="80"></ColumnDefinition>
                    <ColumnDefinition Width="250"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Image Grid.Column="0"  x:Name="photo" Width="80" Height="60" />
                <TextBlock Grid.Column="1" Margin="55,0,0,15" x:Name="NameSurname" FontSize="30" FontWeight="Bold" ></TextBlock>
            </Grid>

        </StackPanel>
        <StackPanel Name="stackAnnouncements" Width="500" Height="300" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0 70 0 0" >
            <TextBlock FontSize="20" Foreground="PaleGoldenrod" FontWeight="Bold" Text="Duyurular"></TextBlock>
            <ScrollViewer Width="500" Height="300" Margin="0,0,0,0">
                <ListView  Name="Announcements">
                    <ListView.ItemTemplate>
                        <DataTemplate>
                            <Border CornerRadius="6"
                                BorderBrush="Gray"
                                Background="LightBlue"
                                BorderThickness="1"
                                Padding="8"
                                Opacity="0.7">
                                <StackPanel Width="400">
                                    <TextBlock FontWeight="Bold" Name="title" Text="{Binding AnnouncementTitle}"></TextBlock>
                                    <Border BorderThickness="0 1 0 0" Padding="0 3 0 0" BorderBrush="AntiqueWhite">
                                        <WrapPanel>
                                            <TextBlock Name="content" TextWrapping="Wrap" Text="{Binding AnnouncementContent}"></TextBlock>
                                        </WrapPanel>
                                    </Border>
                                </StackPanel>
                            </Border>
                        </DataTemplate>
                    </ListView.ItemTemplate>
                </ListView>
            </ScrollViewer>
        </StackPanel>
        <StackPanel Name="stackWatchmans" Width="400" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 70 0 0">
            <ScrollViewer HorizontalAlignment="Stretch">
                <StackPanel  x:Name="stckWatchers" Visibility="Hidden" HorizontalAlignment="Right">
                    <Label Content="Nöbetçiler"  FontSize="20" Foreground="LightBlue"  HorizontalAlignment="Right" FontWeight="Bold"/>
                    <ListBox  x:Name="watcherList" FontSize="16">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Border CornerRadius="6"
                                BorderBrush="Gray"
                                Background="PaleGoldenrod"
                                BorderThickness="1"
                                Padding="8"
                                Opacity="0.7">
                                    <TextBlock HorizontalAlignment="Center"  TextAlignment="Left" TextWrapping="Wrap" Width="150"  Text="{Binding WatchmanName}"  IsHitTestVisible="False" />
                                </Border>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </StackPanel>
            </ScrollViewer>
        </StackPanel>
    </Grid>
</UserControl>
